/**
 * js-cookie
 * npm cookie 本项目暂时未启用，用的是 自带 libs - cookieApi.js
 */
import Cookies from 'js-cookie'

const TokenKey = 'Authorization'
const wxcode = 'Wxcode'
const RefreshTokenKey = 'RefreshToken'

// 用户单点登录token
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
// 用户单点登录 refreshToken
export function getRefreshToken() {
  return Cookies.get(RefreshTokenKey)
}

export function setRefreshToken(token) {
  return Cookies.set(RefreshTokenKey, token)
}

export function removeRefreshToken() {
  return Cookies.remove(RefreshTokenKey)
}

// 微信code
export function getWxCode() {
  return Cookies.get(wxcode)
}

export function setWxCode(rescode) {
  return Cookies.set(wxcode, rescode)
}

export function removeWxCode() {
  return Cookies.remove(wxcode)
}

